package com.dily.study.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dily.study.demo.entity.mybatisPlus.BigDataDemo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

import java.util.List;

/**
 * Date: 2022-03-24 星期四
 * Time: 13:35
 * Author: Dily_Su
 * Remark:
 */
@Mapper
public interface BigDataDemoMapper extends BaseMapper<BigDataDemo> {

    /**
     * 流式查询 不知道好不好使
     * @param handler
     * @return
     */
    @Select("select * from big_data_demo")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = Integer.MIN_VALUE)//mysql情况比较特殊，只能这样设置
    @ResultType(BigDataDemo.class)
    List<BigDataDemo> getAllRecord(ResultHandler<?> handler);



}
